Basic Query

A basic query requires three inputs:

  • key Your private developer API key.
  • starttime The start time for queried events.
  • endtime The end time for queried events.

Note

  • All timestamps in the platform are returned in UNIX time format.
  • It is recomended that you use your own ‘start of day’ and ‘end of day’ times when querying the API
  • API returns content in JSON format

Sample Query

Query:

Make sure to use actual values for <apikey>, <starttime>, and <endtime>:
#!/bin/bash
curl "https://partner.payjoy.com/v1/list-transactions.php?\
key=<apikey>&starttime=<starttime>&endtime=<endtime>"

Results

JSON result:
     {
       "valid":true,
       "transactions":[
       {
         "type":"finance",
         "time":1482000000,
         "amount":200,
         "currency":"USD",
         "financeOrder":{"id":4000004,"purchaseAmount":300,
             "financeAmount":200,"downPayment":100,"pricePreTax":300,
             "monthlyCost":18,"weeklyCost":4,"months":12},
         "merchant":{"id":4000002,"name":"API Test Merchant"},
         "salesClerk":{"id":4000003,"name":"Demo Clerk1"},
         "customer":{"id":4000005,"name":"API User","phoneNumber":"14084930580"},
         "device":{
           "phoneNumber":"15052111315",
           "simNumber":"12345678901774567891",
           "imei":"339977",
           "family":{"id":3,"name":"Galaxy S6"},
           "model":{"id":3,"makeModel":"SAMSUNG SM-G920P",
             "name":"Samsung Galaxy S6 (Boost\/Sprint)"}
         }
       },
       {
         "type":"cash",
         "time":1487000002,
         "amount":-18,
         "currency":"USD",
         "payment":{"id":4000008,"timestamp":1487000002,"amount":18},
         "financeOrder":{"id":4000004},
         "merchant":{"id":4000002,"name":"API Test Merchant"},
         "salesClerk":{"id":4000003,"name":"Demo Clerk1"},
         "customer":{"id":4000005,"name":"API User","phoneNumber":"14084930580"}
       }]
     }